package com.math.util;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.math.BigInteger;
import java.util.Date;

public class StatisticBean  implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	//Game-Properties
	private String game_name;
	private Date game_startDate=null;
	private Date game_initDate=null;
	
	//Round-Properties
	private Integer round_number=null;
	private Date round_startDate=null;
	private Date round_endDate=null;
	
	//CompanyRoundDecisionAndResult
	private Double decres_revenue=null;
	private Double decres_expenses=null;
	private Double decres_marketingInvestment=null;
	private Double decres_employerEducationInvestment=null;
	private Double decres_rdInvestment=null;
	private Double decres_overdraftCosts=null;
	private Double decres_logisticCosts=null;
	private Double decres_newImage=null;
	private Double decres_newBudget=null;
	private Double decres_reportCosts=null;
	
	//User - Company
	private String company_nickname;
	private String company_email;
	private Double company_budget=null;
	private Double company_imageValue=null;
	private Double company_marketingBudget=null;
	private Double company_employerEducationBudget=null;
	private Double company_rdBudget=null;
	
	//Supplier
	private String supplier_name=null;
	private Double supplier_discountPerTenUnits=null; 
	private Double supplier_deliveryCost=null;
	
	//Product
	private String product_name=null;
	private Double product_qualityFactor=null;
	private Double product_imageFactor=null;
	private Double product_productCosts=null;
	
	//CompanyProduct
	private Double compprod_sellingPrice=null;
	private BigInteger compprod_amountSold=null;
	
	//AgentType
	private String agType_agentName;
	private Integer agType_moneyPerPeriod;
	private Integer agType_amount;
	private Double agType_meanQuality;
	private Double agType_meanPrice;
	private Double agType_meanImage;
	
	//Agent
	private Double agent_preferenceQuality;
	private Double agent_preferencePrice;
	private Double agent_preferenceImage;
	private String agent_name=null;
	
	//AgentTypeCompanyProduct
	private Integer atcp_amountSold=null;
	
	//number of general things
	private BigInteger count=null;
	private BigInteger amountCompanyProducts=null;
	private BigInteger amountDifferentProducts=null;
	
	//Report
	private String report_name=null;
	
	/**
	 * @return the game_name
	 */
	public String getGame_name() {
		return game_name;
	}

	/**
	 * @param game_name the game_name to set
	 */
	public void setGame_name(String game_name) {
		this.game_name = game_name;
	}

	/**
	 * @return the game_startDate
	 */
	public Date getGame_startDate() {
		return game_startDate;
	}

	/**
	 * @param game_startDate the game_startDate to set
	 */
	public void setGame_startDate(Date game_startDate) {
		this.game_startDate = game_startDate;
	}

	/**
	 * @return the game_initDate
	 */
	public Date getGame_initDate() {
		return game_initDate;
	}

	/**
	 * @param game_initDate the game_initDate to set
	 */
	public void setGame_initDate(Date game_initDate) {
		this.game_initDate = game_initDate;
	}

	/**
	 * @return the round_number
	 */
	public Integer getRound_number() {
		return round_number;
	}

	/**
	 * @param round_number the round_number to set
	 */
	public void setRound_number(Integer round_number) {
		this.round_number = round_number;
	}

	/**
	 * @return the round_startDate
	 */
	public Date getRound_startDate() {
		return round_startDate;
	}

	/**
	 * @param round_startDate the round_startDate to set
	 */
	public void setRound_startDate(Date round_startDate) {
		this.round_startDate = round_startDate;
	}

	/**
	 * @return the round_endDate
	 */
	public Date getRound_endDate() {
		return round_endDate;
	}

	/**
	 * @param round_endDate the round_endDate to set
	 */
	public void setRound_endDate(Date round_endDate) {
		this.round_endDate = round_endDate;
	}

	/**
	 * @return the decres_revenue
	 */
	public Double getDecres_revenue() {
		return decres_revenue;
	}

	/**
	 * @param decres_revenue the decres_revenue to set
	 */
	public void setDecres_revenue(Double decres_revenue) {
		this.decres_revenue = decres_revenue;
	}

	/**
	 * @return the decres_expenses
	 */
	public Double getDecres_expenses() {
		return decres_expenses;
	}

	/**
	 * @param decres_expenses the decres_expenses to set
	 */
	public void setDecres_expenses(Double decres_expenses) {
		this.decres_expenses = decres_expenses;
	}

	/**
	 * @return the decres_marketingInvestment
	 */
	public Double getDecres_marketingInvestment() {
		return decres_marketingInvestment;
	}

	/**
	 * @param decres_marketingInvestment the decres_marketingInvestment to set
	 */
	public void setDecres_marketingInvestment(Double decres_marketingInvestment) {
		this.decres_marketingInvestment = decres_marketingInvestment;
	}

	/**
	 * @return the decres_employerEducationInvestment
	 */
	public Double getDecres_employerEducationInvestment() {
		return decres_employerEducationInvestment;
	}

	/**
	 * @param decres_employerEducationInvestment the decres_employerEducationInvestment to set
	 */
	public void setDecres_employerEducationInvestment(
			Double decres_employerEducationInvestment) {
		this.decres_employerEducationInvestment = decres_employerEducationInvestment;
	}

	/**
	 * @return the decres_rdInvestment
	 */
	public Double getDecres_rdInvestment() {
		return decres_rdInvestment;
	}

	/**
	 * @param decres_rdInvestment the decres_rdInvestment to set
	 */
	public void setDecres_rdInvestment(Double decres_rdInvestment) {
		this.decres_rdInvestment = decres_rdInvestment;
	}

	/**
	 * @return the company_nickname
	 */
	public String getCompany_nickname() {
		return company_nickname;
	}

	/**
	 * @param company_nickname the company_nickname to set
	 */
	public void setCompany_nickname(String company_nickname) {
		this.company_nickname = company_nickname;
	}

	/**
	 * @return the company_email
	 */
	public String getCompany_email() {
		return company_email;
	}

	/**
	 * @param company_email the company_email to set
	 */
	public void setCompany_email(String company_email) {
		this.company_email = company_email;
	}

	/**
	 * @return the company_budget
	 */
	public Double getCompany_budget() {
		return company_budget;
	}

	/**
	 * @param company_budget the company_budget to set
	 */
	public void setCompany_budget(Double company_budget) {
		this.company_budget = company_budget;
	}

	/**
	 * @return the company_imageValue
	 */
	public Double getCompany_imageValue() {
		return company_imageValue;
	}

	/**
	 * @param company_imageValue the company_imageValue to set
	 */
	public void setCompany_imageValue(Double company_imageValue) {
		this.company_imageValue = company_imageValue;
	}

	/**
	 * @return the company_marketingBudget
	 */
	public Double getCompany_marketingBudget() {
		return company_marketingBudget;
	}

	/**
	 * @param company_marketingBudget the company_marketingBudget to set
	 */
	public void setCompany_marketingBudget(Double company_marketingBudget) {
		this.company_marketingBudget = company_marketingBudget;
	}

	/**
	 * @return the company_employerEducationBudget
	 */
	public Double getCompany_employerEducationBudget() {
		return company_employerEducationBudget;
	}

	/**
	 * @param company_employerEducationBudget the company_employerEducationBudget to set
	 */
	public void setCompany_employerEducationBudget(
			Double company_employerEducationBudget) {
		this.company_employerEducationBudget = company_employerEducationBudget;
	}

	/**
	 * @return the company_rdBudget
	 */
	public Double getCompany_rdBudget() {
		return company_rdBudget;
	}

	/**
	 * @param company_rdBudget the company_rdBudget to set
	 */
	public void setCompany_rdBudget(Double company_rdBudget) {
		this.company_rdBudget = company_rdBudget;
	}

	/**
	 * @return the supplier_name
	 */
	public String getSupplier_name() {
		return supplier_name;
	}

	/**
	 * @param supplier_name the supplier_name to set
	 */
	public void setSupplier_name(String supplier_name) {
		this.supplier_name = supplier_name;
	}

	/**
	 * @return the supplier_discountPerTenUnits
	 */
	public Double getSupplier_discountPerTenUnits() {
		return supplier_discountPerTenUnits;
	}

	/**
	 * @param supplier_discountPerTenUnits the supplier_discountPerTenUnits to set
	 */
	public void setSupplier_discountPerTenUnits(Double supplier_discountPerTenUnits) {
		this.supplier_discountPerTenUnits = supplier_discountPerTenUnits;
	}

	/**
	 * @return the supplier_deliveryCost
	 */
	public Double getSupplier_deliveryCost() {
		return supplier_deliveryCost;
	}

	/**
	 * @param supplier_deliveryCost the supplier_deliveryCost to set
	 */
	public void setSupplier_deliveryCost(Double supplier_deliveryCost) {
		this.supplier_deliveryCost = supplier_deliveryCost;
	}

	/**
	 * @return the product_name
	 */
	public String getProduct_name() {
		return product_name;
	}

	/**
	 * @param product_name the product_name to set
	 */
	public void setProduct_name(String product_name) {
		this.product_name = product_name;
	}

	/**
	 * @return the product_qualityFactor
	 */
	public Double getProduct_qualityFactor() {
		return product_qualityFactor;
	}

	/**
	 * @param product_qualityFactor the product_qualityFactor to set
	 */
	public void setProduct_qualityFactor(Double product_qualityFactor) {
		this.product_qualityFactor = product_qualityFactor;
	}

	/**
	 * @return the product_imageFactor
	 */
	public Double getProduct_imageFactor() {
		return product_imageFactor;
	}

	/**
	 * @param product_imageFactor the product_imageFactor to set
	 */
	public void setProduct_imageFactor(Double product_imageFactor) {
		this.product_imageFactor = product_imageFactor;
	}

	/**
	 * @return the product_productCosts
	 */
	public Double getProduct_productCosts() {
		return product_productCosts;
	}

	/**
	 * @param product_productCosts the product_productCosts to set
	 */
	public void setProduct_productCosts(Double product_productCosts) {
		this.product_productCosts = product_productCosts;
	}

	/**
	 * @return the compprod_sellingPrice
	 */
	public Double getCompprod_sellingPrice() {
		return compprod_sellingPrice;
	}

	/**
	 * @param compprod_sellingPrice the compprod_sellingPrice to set
	 */
	public void setCompprod_sellingPrice(Double compprod_sellingPrice) {
		this.compprod_sellingPrice = compprod_sellingPrice;
	}

	/**
	 * @return the compprod_amountSold
	 */
	public BigInteger getCompprod_amountSold() {
		return compprod_amountSold;
	}

	/**
	 * @param compprod_amountSold the compprod_amountSold to set
	 */
	public void setCompprod_amountSold(BigInteger compprod_amountSold) {
		this.compprod_amountSold = compprod_amountSold;
	}

	/**
	 * @return the agType_agentName
	 */
	public String getAgType_agentName() {
		return agType_agentName;
	}

	/**
	 * @param agType_agentName the agType_agentName to set
	 */
	public void setAgType_agentName(String agType_agentName) {
		this.agType_agentName = agType_agentName;
	}

	/**
	 * @return the agType_moneyPerPeriod
	 */
	public Integer getAgType_moneyPerPeriod() {
		return agType_moneyPerPeriod;
	}

	/**
	 * @param agType_moneyPerPeriod the agType_moneyPerPeriod to set
	 */
	public void setAgType_moneyPerPeriod(Integer agType_moneyPerPeriod) {
		this.agType_moneyPerPeriod = agType_moneyPerPeriod;
	}

	/**
	 * @return the agType_amount
	 */
	public Integer getAgType_amount() {
		return agType_amount;
	}

	/**
	 * @param agType_amount the agType_amount to set
	 */
	public void setAgType_amount(Integer agType_amount) {
		this.agType_amount = agType_amount;
	}

	/**
	 * @return the agType_meanQuality
	 */
	public Double getAgType_meanQuality() {
		return agType_meanQuality;
	}

	/**
	 * @param agType_meanQuality the agType_meanQuality to set
	 */
	public void setAgType_meanQuality(Double agType_meanQuality) {
		this.agType_meanQuality = agType_meanQuality;
	}

	/**
	 * @return the agType_meanPrice
	 */
	public Double getAgType_meanPrice() {
		return agType_meanPrice;
	}

	/**
	 * @param agType_meanPrice the agType_meanPrice to set
	 */
	public void setAgType_meanPrice(Double agType_meanPrice) {
		this.agType_meanPrice = agType_meanPrice;
	}

	/**
	 * @return the agType_meanImage
	 */
	public Double getAgType_meanImage() {
		return agType_meanImage;
	}

	/**
	 * @param agType_meanImage the agType_meanImage to set
	 */
	public void setAgType_meanImage(Double agType_meanImage) {
		this.agType_meanImage = agType_meanImage;
	}

	/**
	 * @return the agent_preferenceQuality
	 */
	public Double getAgent_preferenceQuality() {
		return agent_preferenceQuality;
	}

	/**
	 * @param agent_preferenceQuality the agent_preferenceQuality to set
	 */
	public void setAgent_preferenceQuality(Double agent_preferenceQuality) {
		this.agent_preferenceQuality = agent_preferenceQuality;
	}

	/**
	 * @return the agent_preferencePrice
	 */
	public Double getAgent_preferencePrice() {
		return agent_preferencePrice;
	}

	/**
	 * @param agent_preferencePrice the agent_preferencePrice to set
	 */
	public void setAgent_preferencePrice(Double agent_preferencePrice) {
		this.agent_preferencePrice = agent_preferencePrice;
	}

	/**
	 * @return the agent_preferenceImage
	 */
	public Double getAgent_preferenceImage() {
		return agent_preferenceImage;
	}

	/**
	 * @param agent_preferenceImage the agent_preferenceImage to set
	 */
	public void setAgent_preferenceImage(Double agent_preferenceImage) {
		this.agent_preferenceImage = agent_preferenceImage;
	}

	/**
	 * @return the agent_name
	 */
	public String getAgent_name() {
		return agent_name;
	}

	/**
	 * @param agent_name the agent_name to set
	 */
	public void setAgent_name(String agent_name) {
		this.agent_name = agent_name;
	}

	/**
	 * @return the atcp_amountSold
	 */
	public Integer getAtcp_amountSold() {
		return atcp_amountSold;
	}

	/**
	 * @return the count
	 */
	public BigInteger getCount() {
		return count;
	}

	/**
	 * @param count the count to set
	 */
	public void setCount(BigInteger count) {
		this.count = count;
	}

	/**
	 * @param atcp_amountSold the atcp_amountSold to set
	 */
	public void setAtcp_amountSold(Integer atcp_amountSold) {
		this.atcp_amountSold = atcp_amountSold;
	}

	/**
	 * @return the decres_overdraftCosts
	 */
	public Double getDecres_overdraftCosts() {
		return decres_overdraftCosts;
	}

	/**
	 * @param decres_overdraftCosts the decres_overdraftCosts to set
	 */
	public void setDecres_overdraftCosts(Double decres_overdraftCosts) {
		this.decres_overdraftCosts = decres_overdraftCosts;
	}

	/**
	 * @return the decres_logisticCosts
	 */
	public Double getDecres_logisticCosts() {
		return decres_logisticCosts;
	}

	/**
	 * @param decres_logisticCosts the decres_logisticCosts to set
	 */
	public void setDecres_logisticCosts(Double decres_logisticCosts) {
		this.decres_logisticCosts = decres_logisticCosts;
	}

	/**
	 * @return the amountCompanyProducts
	 */
	public BigInteger getAmountCompanyProducts() {
		return amountCompanyProducts;
	}

	/**
	 * @param amountCompanyProducts the amountCompanyProducts to set
	 */
	public void setAmountCompanyProducts(BigInteger amountCompanyProducts) {
		this.amountCompanyProducts = amountCompanyProducts;
	}
	
	public String getReport_name() {
		return report_name;
	}

	public void setReport_name(String report_name) {
		this.report_name = report_name;
	}

	/**
	 * @return the amountDifferentProducts
	 */
	public BigInteger getAmountDifferentProducts() {
		return amountDifferentProducts;
	}

	/**
	 * @param amountDifferentProducts the amountDifferentProducts to set
	 */
	public void setAmountDifferentProducts(BigInteger amountDifferentProducts) {
		this.amountDifferentProducts = amountDifferentProducts;
	}

	public Double getDecres_newImage() {
		return decres_newImage;
	}

	public void setDecres_newImage(Double decres_newImage) {
		this.decres_newImage = decres_newImage;
	}

	/**
	 * @return the decres_newBudget
	 */
	public Double getDecres_newBudget() {
		return decres_newBudget;
	}

	/**
	 * @param decres_newBudget the decres_newBudget to set
	 */
	public void setDecres_newBudget(Double decres_newBudget) {
		this.decres_newBudget = decres_newBudget;
	}

	/**
	 * @return the decres_reportCosts
	 */
	public Double getDecres_reportCosts() {
		return decres_reportCosts;
	}

	/**
	 * @param decres_reportCosts the decres_reportCosts to set
	 */
	public void setDecres_reportCosts(Double decres_reportCosts) {
		this.decres_reportCosts = decres_reportCosts;
	}

	@Override
	public String toString() {
	    Class<? extends Object> objClass= this.getClass();
	    StringBuffer sb=new StringBuffer();
	    
	    // Get the public methods associated with this class.
	    Method[] methods = objClass.getMethods();
	    for (Method method:methods)
	    {
	    	try {
	    		if(method.getName().startsWith("get") && !method.getName().contains("Class")){
	    			String nameString=method.getName().replaceFirst("get", "");
					Object o=method.invoke(this);
					if(o!=null){
						sb.append(nameString+": "+o.toString()+", ");
					}
	    		}
			} catch (RuntimeException e) {
			} catch (IllegalAccessException e) {
			} catch (InvocationTargetException e) {
			}
	    }
	    return sb.toString();
	}
	
	
}
